﻿

'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic

Public Class dc_Processor
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_physProcLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "


    Public Const constPhysProcKey As Integer = -1
    Public Const constPhysProcCompKey As Integer = -1
    Public Const constPhysProcName As String = "na"
    Public Const constPhysProcCores As Integer = 1
    Public Const constPhysProcCoreSpeed As Long = 2500
    Public Const constPhysProcDataWidth As Integer = 32
    Public Const constPhysProcAddrWidth As Integer = 32
    Public Const constPhysProcMemSize As Long = 1000000000
    Public Const constPhysProcComment As String = "na"
    Public Const constPhysProcLastUpdate As Date = #1/1/2001#
    Public Const constPhysProcLastEdit As String = "na"

    Private m_physProcKey As Integer
    Public Property physProcKey() As Integer
        Get
            Return Me.m_physProcKey
        End Get
        Set(ByVal value As Integer)
            m_physProcKey = value
        End Set
    End Property

    Private m_physProcCompKey As Integer
    Public Property physProcCompKey() As Integer
        Get
            Return Me.m_physProcCompKey
        End Get
        Set(ByVal value As Integer)
            m_physProcCompKey = value
        End Set
    End Property

    Private m_physProcName As String
    Public Property physProcName() As String
        Get
            Return Me.m_physProcName
        End Get
        Set(ByVal value As String)
            m_physProcName = value
        End Set
    End Property

    Private m_physProcCores As Integer
    Public Property physProcCores() As Integer
        Get
            Return Me.m_physProcCores
        End Get
        Set(ByVal value As Integer)
            m_physProcCores = value
        End Set
    End Property

    Private m_physProcCoreSpeed As Long
    Public Property physProcCoreSpeed() As Long
        Get
            Return Me.m_physProcCoreSpeed
        End Get
        Set(ByVal value As Long)
            m_physProcCoreSpeed = value
        End Set
    End Property

    Private m_physProcDataWidth As Integer
    Public Property physProcDataWidth() As Integer
        Get
            Return Me.m_physProcDataWidth
        End Get
        Set(ByVal value As Integer)
            m_physProcDataWidth = value
        End Set
    End Property

    Private m_physProcAddrWidth As Integer
    Public Property physProcAddrWidth() As Integer
        Get
            Return Me.m_physProcAddrWidth
        End Get
        Set(ByVal value As Integer)
            m_physProcAddrWidth = value
        End Set
    End Property

    Private m_physProcMemSize As Long
    Public Property physProcMemSize() As Long
        Get
            Return Me.m_physProcMemSize
        End Get
        Set(ByVal value As Long)
            m_physProcMemSize = value
        End Set
    End Property

    Private m_physProcComment As String
    Public Property physProcComment() As String
        Get
            Return Me.m_physProcComment
        End Get
        Set(ByVal value As String)
            m_physProcComment = value
        End Set
    End Property


    Private m_physProcLastUpdate As Date
    Public Property physProcLastUpdate() As Date
        Get
            Return Me.m_physProcLastUpdate
        End Get
        Set(ByVal value As Date)
            m_physProcLastUpdate = value
        End Set
    End Property

    Private m_physProcLastEdit As String
    Public Property physProcLastEdit() As String
        Get
            Return Me.m_physProcLastEdit
        End Get
        Set(ByVal value As String)
            m_physProcLastEdit = value
        End Set
    End Property



#End Region

#Region " Methods "


    Public Sub initProperties()

        Try

            physProcKey = constPhysProcKey
            physProcCompKey = constPhysProcKey
            physProcName = constPhysProcName
            physProcCores = constPhysProcCores
            physProcCoreSpeed = constPhysProcCoreSpeed
            physProcDataWidth = constPhysProcDataWidth
            physProcAddrWidth = constPhysProcAddrWidth
            physProcMemSize = constPhysProcMemSize
            physProcComment = constPhysProcComment
            physProcLastUpdate = constPhysProcLastUpdate
            physProcLastEdit = constPhysProcLastEdit

        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class



